<?php
if(!defined('IN_BSTO')){ die('[ERROR] You cannot load this page directly !!!'); }
Class AboutController Extends BaseController {

	public function index() {

		$aboutUs = array_pop($this->registry->db->get('staticManager')->getAboutUs());
		 
		$leftContent = '';

		//echo $aboutUs->get('value');
		if ($aboutUs->get('value') == 'Default Page') {						
			$title = 'Default Page';
			$picTag = ' ';			
		} else {
			$title = 'About Us';			
		}
		$leftContent .= '
            <div class="title"><span class="title_icon"><img src="'.BSTO_ROOT_PATH.'views/images/bullet1.gif" alt="" title="" /></span>' . $title . '</div>
        
        	<div class="feat_prod_box_details">';
		
            

		//echo $aboutUs->get('datail');
		$leftContent .= "<br /><br />".$aboutUs->get('detail');
		$leftContent .= '</p> </div> ' ;

		$this->registry->template->setMenuKey('about');
		$tags = array('bstoHead'=>"");
		$user = $this->registry->db->get('userManager')->getCurrentUser();
        if($user != null){
        	$tags['login'] = '<li id="login"><span> Hello, '. $user->get('username').'</span><a href="{bstoRootPath}logout">Logout</a></li>';	
        }else{
        	$tags['login'] = '<li id="login"><a href="{bstoRootPath}login">Login</a></li>';
        }
		$output = $this->registry->template->getPageContent('index', $title, $leftContent , $tags);

		echo $output;
	}

}
?>